<template>
  <div id="app">
    <div class="app_top_box">
      <div class="app_top">
        <div class="app_top_left">
          <div class="logo">
            <img src="@/assets/images/logo.jpg" alt />
          </div>
          <div class="name">网易云音乐</div>
        </div>
        <div class="app_top_right">下载APP</div>
      </div>
      <div class="app_main">
        <!-- 推荐音乐 -->
        <router-link class="item" to="/">推荐音乐</router-link>

        <!-- // 热歌榜 -->
        <router-link class="item" to="/rank_list">热歌榜</router-link>

        <!-- 搜索 -->
        <router-link class="item" to="/search">搜索</router-link>
      </div>
    </div>
    <!-- exclude="name值" 可以排除不需要的缓存 -->
    <transition>
      <keep-alive exclude="item">
        <router-view />
      </keep-alive>
    </transition>
    <player></player>
  </div>
</template>
<script>
import player from './components/player'
// https://netease.bluej.cn/  文档
export default {
  data() {
    return {
      // 切换类名修改样式
      // isChoose:false
    };
  },
  components:{
    player
  }
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  padding: 120px 0 60px;
  .app_top_box {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
  }
  .app_top {
    width: 100vw;
    background-color: skyblue;
    height: 80px;
    line-height: 5rem;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    align-items: center;
    .app_top_left {
      display: flex;
      align-items: center;
      .logo {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        border: 1px solid white;
        overflow: hidden;
        img {
          width: 100%;
        }
      }
      .name {
        font-size: 18px;
        color: white;
        margin-left: 10px;
      }
    }
    .app_top_right {
      font-size: 18px;
      background-color: white;
      border-radius: 2rem;
      color: skyblue;
      height: 40px;
      line-height: 40px;
      padding: 0 15px;
    }
  }
  .app_main {
    display: flex;
    justify-content: space-around;
    height: 40px;
    line-height: 40px;
    border-bottom: 1px solid #e6e6e6;
    background-color: white;
    .item {
      color: black;
      &.router-link-exact-active {
        border-bottom: 2px solid skyblue;
        color: skyblue;
      }
    }
  }
}
</style>
